<?php
namespace app\common\model;

use think\Db;
use think\Model;

class FormItem extends Model
{

    public function form(){
        return $this->hasOne('Form','id','form_id');
    }

    public function getTypeTextAttr($value,$data){
        $a = explode('|',\app\dlc\common\form\Form::$typeList[$data['type']]);
        return $a[0];
    }

}